package murraco.controller;

import murraco.common.Result;
import murraco.service.PileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/piles")
@CrossOrigin
public class PileController {
    @Autowired
    private PileService pileService;

    @GetMapping
    public Result getPileList(){
        return Result.success(pileService.getPileList());
    }
}
